package com.zyp.boot07.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class BMIController {
    @RequestMapping("/bmi")
    public String bmi(double h,double w) {
        double bmi = w/(h*h);
        if (bmi<=18.5) {
            return "Thin";
        }
        if (bmi<=24) {
            return "Normal";
        }
        if (bmi<=27) {
            return "Fat";
        }
        return "Corpulent";
    }
}
